package com.board.controller;

import com.board.entity.Message;
import com.board.service.JOJOService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Insert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@CrossOrigin
public class JOJOController {
    @Autowired
    private JOJOService jojoService;
    @RequestMapping("/insert")
    public String insert(@RequestBody Message message){
        log.info("Received message: {}", message);
        return jojoService.insert(message.getContent());
    }
}
